home *** CD-ROM | disk | FTP | other *** search
Text File | 2001-02-27 | 863 b | 47 lines | [AMAS/AMAP] |
- // -* HideBehavior.js *-
- //
- // Name: Hide behavior
- // Description:
- // Author:
- // Version: $Id: HideBehavior.js,v 1.3 2001/02/27 11:43:00 consumer Exp $
- //
-
- function HideBehavior()
- {
- // No need for an object with this behavior.
- }
-
- function HideBehaviorStart(solidName, geom)
- {
- // Member variables of the behavior
- this.solidName = solidName;
- this.geom = geom;
-
- TSUpdateNodeAttribute(geom, 'visible', '0');
- }
-
- function HideBehaviorStop()
- {
- TSUpdateNodeAttribute(this.geom, 'visible', '1');
- }
-
- //
- // Event functions
- //
-
- function HideBehaviorStartEvent(obj, event)
- {
- var geom = TSGetExtraParam(event, 'geom');
- var targetSolid = TSGetExtraParam(event, 'targetSolid');
-
- if (targetSolid == "")
- HideBehaviorStart(obj, geom);
- else
- HideBehaviorStart(targetSolid, geom);
- }
-
- function HideBehaviorStopEvent(obj, event)
- {
- HideBehaviorStop() ;
- }
-